Skip to content

Conversation

@lvluoyue
Copy link
Contributor

HTTP status code should return 200
image

@chr-hertel
Copy link
Member

@CodeWithKyrian do you recall why it's 204 - can't find sth in the specs directly?

@CodeWithKyrian
Copy link
Contributor

Yeah, there’s nothing in the MCP spec that requires a specific code here. The only other 2xx mentioned is for notifications (202). We went with 204 because it’s the standard HTTP response for a successful DELETE with no body. I haven’t seen any MCP clients reject it, so it seemed like the most logical choice at the time.

@lvluoyue
Copy link
Contributor Author

lvluoyue commented Nov 29, 2025

Yeah, there’s nothing in the MCP spec that requires a specific code here. The only other 2xx mentioned is for notifications (202). We went with 204 because it’s the standard HTTP response for a successful DELETE with no body. I haven’t seen any MCP clients reject it, so it seemed like the most logical choice at the time.

I tested with MCP Inspector v0.17.2 and it cannot shut down properly. The error is shown in the previously mentioned image. I compared it with Typescript SDK, and they indeed return 200.

@Nyholm
Copy link
Contributor

Nyholm commented Nov 30, 2025

Give me a few minutes to verify

@Nyholm
Copy link
Contributor

Nyholm commented Nov 30, 2025

Im reading the specification here. I fail to reproduce the errors your screenshot.

(I think you are correct, but I fail to verify) Can you please share how you start the inspector and how to reproduce?

@lvluoyue
Copy link
Contributor Author

lvluoyue commented Nov 30, 2025

Im reading the specification here. I fail to reproduce the errors your screenshot.

(I think you are correct, but I fail to verify) Can you please share how you start the inspector and how to reproduce?

Click the Disconnect button.
image

@chr-hertel
Copy link
Member

Could reproduce locally with inspector:
image

and also verify that it works with this branch - thanks @lvluoyue for the patch!

@Nyholm
Copy link
Contributor

Nyholm commented Nov 30, 2025

Sorry, my bad. You need to use "proxy", and not "direct" setting.

I see both 200 and 202 works and the specification does not cover this. Im happy with this change.

@Nyholm Nyholm merged commit 691e4f7 into modelcontextprotocol:main Nov 30, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants